<template>
  <div>
    <h2>{{ store.state.counter.count }}</h2>
    <h3>{{ store.getters['counter/doubbleCount'] }}</h3>
    <button @click="increment">同步+</button>
    <button @click="incrementAsync">异步+</button>
  </div>
</template>

<script lang='ts' setup>
import {useStore} from 'vuex'
const store=useStore()
console.log(store.state.counter.count);
const increment=()=>{
  store.commit("counter/INCREMENT",2)
}
const incrementAsync=()=>{
  store.dispatch("counter/incrementAsync",3)
}

</script>

<style lang='scss' scoped>
</style>